<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SWM34S_LVGL7.11_SWMUI: C:/Users/DELL/Desktop/Commit/lvgl/SWM34S_LVGL7.11_SWMUI_20230515/APP/Common Module/userboot.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">SWM34S_LVGL7.11_SWMUI<span id="projectnumber">&#160;V7.9</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.5 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_0ca16891106f5a3e9ad635a0d6c5f98f.html">APP</a></li><li class="navelem"><a class="el" href="dir_df4e0e4e72f77ab290fd1a24f190250a.html">Common Module</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle"><div class="title">userboot.h</div></div>
</div><!--header-->
<div class="contents">
<a href="userboot_8h.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span> </div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span><span class="preprocessor">#ifndef __USERBOOT_H__</span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno">   59</span><span class="preprocessor">#define __USERBOOT_H__</span></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span> </div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno">   61</span><span class="preprocessor">#include &quot;SWM341.h&quot;</span></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span><span class="preprocessor">#include &quot;<a class="code" href="load__file_8h.html">load_file.h</a>&quot;</span></div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span> </div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span><span class="comment">//=================================================宏定义========================================================//</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span><span class="comment">/* UserBoot 引导启动标志(uint32_t) 枚举 -- 魔数 */</span></div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"><a class="line" href="userboot_8h.html#ab5291277ab324974f338bae35cb1c659">   66</a></span><span class="preprocessor">#define GO_APP              (0x12345678) </span></div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"><a class="line" href="userboot_8h.html#a734de0e7ed34780e74e947005d781741">   67</a></span><span class="preprocessor">#define EXEC_UPDATE         (0x23456789) </span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"><a class="line" href="userboot_8h.html#a9253bb7b430cfb21c7a598b2bf67cceb">   68</a></span><span class="preprocessor">#define BACKUP_RESTORE      (0x3456789A) </span></div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span><span class="comment">//================================================类型声明=======================================================//</span></div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"><a class="line" href="userboot_8h.html#a73b10fad3e8bed1f1afc0b09e52b4498">   72</a></span><span class="comment"></span><span class="keyword">typedef</span> int (*<a class="code hl_typedef" href="userboot_8h.html#a73b10fad3e8bed1f1afc0b09e52b4498">data_code_cb</a>)(<span class="keyword">const</span> <span class="keywordtype">void</span> *src_buff, <span class="keywordtype">void</span> *dst_buff, uint32_t bytes);</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno">   73</span> </div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span><span class="comment">//================================================变量声明=======================================================//</span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span><span class="comment"></span><span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keyword">const</span> <a class="code hl_variable" href="userboot_8h.html#a24048df1d0e7c6baee931ac9501003b6">Firmware_Name_Update</a>;</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span><span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keyword">const</span> <a class="code hl_variable" href="userboot_8h.html#a538e1fe7d9d421fde968ca66d523f230">Firmware_Name_Backup</a>;</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno">   80</span><span class="keyword">extern</span> <span class="keyword">const</span> <a class="code hl_enumeration" href="load__file_8h.html#a44edb5dd69763758dda6af4dd162c997">disk_t</a> <a class="code hl_variable" href="userboot_8h.html#a28c8f7a4d5f717351aca6027fd3d7ab7">Firmware_Disk</a>;</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno">   81</span> </div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno">   82</span><span class="comment">//================================================函数声明=======================================================//</span></div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span><span class="comment"></span><span class="keywordtype">void</span> <a class="code hl_function" href="userboot_8h.html#a5d51bf8d3184d1c34b5fde41d69b1559">userboot</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno">   90</span> </div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno">   98</span><span class="keywordtype">void</span> <a class="code hl_function" href="userboot_8h.html#acdd804b92809fcd58b2bc135fc74666c">jump_to_userboot</a>(uint32_t boot_flag, <span class="keywordtype">bool</span> wait);</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno">   99</span> </div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span>uint8_t <a class="code hl_function" href="userboot_8h.html#a759a4106353e92e06e9d15926228c576">firmware_download</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *src_path, <span class="keyword">const</span> <span class="keywordtype">char</span> *dst_path, <a class="code hl_typedef" href="userboot_8h.html#a73b10fad3e8bed1f1afc0b09e52b4498">data_code_cb</a> data_enc);</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span> </div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno">  120</span><span class="keywordtype">int</span> <a class="code hl_function" href="userboot_8h.html#a52a519a37465a7b4515a237114afa802">data_encode</a>(<span class="keyword">const</span> <span class="keywordtype">void</span> *src_buff, <span class="keywordtype">void</span> *dst_buff, uint32_t bytes);</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno">  121</span> </div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno">  131</span><span class="keywordtype">int</span> <a class="code hl_function" href="userboot_8h.html#a0591f13c34e15c4d9fbe31fd99726a94">data_decode</a>(<span class="keyword">const</span> <span class="keywordtype">void</span> *src_buff, <span class="keywordtype">void</span> *dst_buff, uint32_t bytes);</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno">  132</span> </div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno">  133</span><span class="preprocessor">#endif </span><span class="comment">//__USERBOOT_H__</span></div>
<div class="ttc" id="aload__file_8h_html"><div class="ttname"><a href="load__file_8h.html">load_file.h</a></div><div class="ttdoc">加载/拷贝文件</div></div>
<div class="ttc" id="aload__file_8h_html_a44edb5dd69763758dda6af4dd162c997"><div class="ttname"><a href="load__file_8h.html#a44edb5dd69763758dda6af4dd162c997">disk_t</a></div><div class="ttdeci">disk_t</div><div class="ttdoc">磁盘类型</div><div class="ttdef"><b>Definition:</b> <a href="load__file_8h_source.html#l00040">load_file.h:41</a></div></div>
<div class="ttc" id="auserboot_8h_html_a0591f13c34e15c4d9fbe31fd99726a94"><div class="ttname"><a href="userboot_8h.html#a0591f13c34e15c4d9fbe31fd99726a94">data_decode</a></div><div class="ttdeci">int data_decode(const void *src_buff, void *dst_buff, uint32_t bytes)</div><div class="ttdoc">数据解密</div><div class="ttdef"><b>Definition:</b> <a href="userboot_8c_source.html#l00606">userboot.c:606</a></div></div>
<div class="ttc" id="auserboot_8h_html_a24048df1d0e7c6baee931ac9501003b6"><div class="ttname"><a href="userboot_8h.html#a24048df1d0e7c6baee931ac9501003b6">Firmware_Name_Update</a></div><div class="ttdeci">const char *const Firmware_Name_Update</div><div class="ttdoc">存放至本地 (SPI-Flash) 的待更新固件文件名</div><div class="ttdef"><b>Definition:</b> <a href="userboot_8c_source.html#l00121">userboot.c:121</a></div></div>
<div class="ttc" id="auserboot_8h_html_a28c8f7a4d5f717351aca6027fd3d7ab7"><div class="ttname"><a href="userboot_8h.html#a28c8f7a4d5f717351aca6027fd3d7ab7">Firmware_Disk</a></div><div class="ttdeci">const disk_t Firmware_Disk</div><div class="ttdoc">本地磁盘类型</div><div class="ttdef"><b>Definition:</b> <a href="userboot_8c_source.html#l00125">userboot.c:125</a></div></div>
<div class="ttc" id="auserboot_8h_html_a52a519a37465a7b4515a237114afa802"><div class="ttname"><a href="userboot_8h.html#a52a519a37465a7b4515a237114afa802">data_encode</a></div><div class="ttdeci">int data_encode(const void *src_buff, void *dst_buff, uint32_t bytes)</div><div class="ttdoc">数据加密</div><div class="ttdef"><b>Definition:</b> <a href="userboot_8c_source.html#l00587">userboot.c:587</a></div></div>
<div class="ttc" id="auserboot_8h_html_a538e1fe7d9d421fde968ca66d523f230"><div class="ttname"><a href="userboot_8h.html#a538e1fe7d9d421fde968ca66d523f230">Firmware_Name_Backup</a></div><div class="ttdeci">const char *const Firmware_Name_Backup</div><div class="ttdoc">存放至本地 (SPI-Flash) 的备份固件文件名</div><div class="ttdef"><b>Definition:</b> <a href="userboot_8c_source.html#l00123">userboot.c:123</a></div></div>
<div class="ttc" id="auserboot_8h_html_a5d51bf8d3184d1c34b5fde41d69b1559"><div class="ttname"><a href="userboot_8h.html#a5d51bf8d3184d1c34b5fde41d69b1559">userboot</a></div><div class="ttdeci">void userboot(void)</div><div class="ttdoc">UserBoot 功能</div><div class="ttdef"><b>Definition:</b> <a href="userboot_8c_source.html#l00168">userboot.c:168</a></div></div>
<div class="ttc" id="auserboot_8h_html_a73b10fad3e8bed1f1afc0b09e52b4498"><div class="ttname"><a href="userboot_8h.html#a73b10fad3e8bed1f1afc0b09e52b4498">data_code_cb</a></div><div class="ttdeci">int(* data_code_cb)(const void *src_buff, void *dst_buff, uint32_t bytes)</div><div class="ttdoc">数据加密/解密回调</div><div class="ttdef"><b>Definition:</b> <a href="userboot_8h_source.html#l00072">userboot.h:72</a></div></div>
<div class="ttc" id="auserboot_8h_html_a759a4106353e92e06e9d15926228c576"><div class="ttname"><a href="userboot_8h.html#a759a4106353e92e06e9d15926228c576">firmware_download</a></div><div class="ttdeci">uint8_t firmware_download(const char *src_path, const char *dst_path, data_code_cb data_enc)</div><div class="ttdoc">固件下载 (外部 =&gt; 本地)</div><div class="ttdef"><b>Definition:</b> <a href="userboot_8c_source.html#l00461">userboot.c:461</a></div></div>
<div class="ttc" id="auserboot_8h_html_acdd804b92809fcd58b2bc135fc74666c"><div class="ttname"><a href="userboot_8h.html#acdd804b92809fcd58b2bc135fc74666c">jump_to_userboot</a></div><div class="ttdeci">void jump_to_userboot(uint32_t boot_flag, bool wait)</div><div class="ttdoc">跳转至 UserBoot 执行对应动作</div><div class="ttdef"><b>Definition:</b> <a href="userboot_8c_source.html#l00417">userboot.c:417</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>
